import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { EvaluteFormMngComponent } from './evalute-form-mng.component';
import { RouterModule, Routes } from '@angular/router';
import { LoginActivate } from '../../../core/auth/login.activate';
import { StudentEvaluteformComponent } from './student-evaluteform/student-evaluteform.component';
import { DepartEvaluteformComponent } from './depart-evaluteform/depart-evaluteform.component';
import { SupervisionEvaluteformComponent } from './supervision-evaluteform/supervision-evaluteform.component';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ShareModule } from '../../../share/share.module';
import { UMeditorModule } from 'ngx-umeditor';

const routes: Routes = [
  {
    path: '', component: EvaluteFormMngComponent, children: [
      {
        path: 'student-evaluteform',
        component: StudentEvaluteformComponent,
        data: {
          breadcrumb: '学生评价表'
        },
        canActivate: [LoginActivate]
      },
      {
        path: 'depart-evaluteform',
        component: DepartEvaluteformComponent,
        data: {
          breadcrumb: '系部评价表'
        },
        canActivate: [LoginActivate]
      },
      {
        path: 'supervision-evaluteform',
        component: SupervisionEvaluteformComponent,
        data: {
          breadcrumb: '督导评价表'
        },
        canActivate: [LoginActivate]
      },
      {
        path: '', redirectTo: 'student-evaluteform', pathMatch: 'full'
      },
      {
        path: '**', component: StudentEvaluteformComponent
      }
    ]
  }
]

@NgModule({
  declarations: [
    EvaluteFormMngComponent,
    StudentEvaluteformComponent,
    DepartEvaluteformComponent,
    SupervisionEvaluteformComponent
  ],
  imports: [
    CommonModule,
    NgZorroAntdModule,
    FormsModule,
    ReactiveFormsModule,
    ShareModule,
    RouterModule.forChild(routes),
    UMeditorModule.forRoot(),
  ]
})
export class EvaluteFormMngModule { }
